{% load ts_extras %}
<div id="controls">
{% if request.session.sgx_program %}
    <h2><a href="{% url tsworkbench.views.sgx.viewSgx request.session.sgx_program.name %}" title="{{request.session.sgx_program.name}}"> {{request.session.sgx_program.name}} </a></h2>
    {% if request.REQUEST.with_sgx ==  "1" %}
    <ul>
        <li><h4>Edit transsys program</h4></li>
        <li><a class="link-button" title="Add new factor to transsys program" href="{% url tsworkbench.views.ts.addFactor request.session.ts_program.tp.name|escapeUrl %}?with_sgx=1">Add a new factor</a></li>
        <li><a class="link-button" title="Add new gene to transsys program" href="{% url tsworkbench.views.ts.addGene request.session.ts_program.tp.name|escapeUrl %}?with_sgx=1">Add a new gene</a></li>
        <li><a class="link-button" title="Code transsys program in transsys language" href="{% url tsworkbench.views.ts.codeTranssys request.session.ts_program.tp.name|escapeUrl %}?with_sgx=1"> Code transsys</a></li>
    </ul>
    {% endif %}
    
    <ul>
        <li><h4>Edit simgenex program</h4></li>
        <li><a class="link-button" title="Add target transsys programs" href="{% url tsworkbench.views.sgx.addTargetTp request.session.sgx_program.name|escapeUrl %}">Add target transsys programs</a></li>
        <li><a class="link-button" title="Add new procedure to simgenex program" href="{% url tsworkbench.views.sgx.addProcedure request.session.sgx_program.name|escapeUrl %}">Add a new procedure</a></li>
        <li><a class="link-button" title="Add new simgenex expression to transsys program" href="{% url tsworkbench.views.sgx.addSimexpression request.session.sgx_program.name|escapeUrl %}">Add a new simexpression</a></li>
        <li><a class="link-button" title="Edit the measurement matrix settings" href="{% url tsworkbench.views.sgx.addMeasurementMatrix request.session.sgx_program.name|escapeUrl %}">Measurement Matrix Setting</a></li>
        <li><a class="link-button" title="Edit the discrimination settings" href="{% url tsworkbench.views.sgx.discriminationSetting request.session.sgx_program.name|escapeUrl %}">Discrimination Setting</a></li>
        <li><a class="link-button" title="Code simgenex program using simgenex language" href="{% url tsworkbench.views.sgx.codeSimgenex request.session.sgx_program.name|escapeUrl %}">Code SimGenex</a></li>
    </ul>
    
    <ul>
        <li><h4>Apply simgenex program</h4></li>
        <li><a class="link-button" title="Upload expression dataset" href="{% url tsworkbench.views.sgx.uploadExpressionSet request.session.sgx_program.name|escapeUrl %}">Upload Expression Dataset</a></li>
        <li><a class="link-button" title="Run simulation" href="{% url tsworkbench.views.sgx.runSimulation request.session.sgx_program.name|escapeUrl %}">Run simulation</a></li>
        {#<li><a class="link-button" title="Compare 2 transsys model" href="{% url tsworkbench.views.sgx.compareTranssysModel request.session.sgx_program.name|escapeUrl %}">Transsys model discrimination</a></li>#}
        <li><a class="link-button" title="Discriminate transsys models" href="{% url tsworkbench.views.sgx.examineTranssysModel request.session.sgx_program.name|escapeUrl %}">Discriminate transsys models</a></li>
    </ul>
{% endif %}
</div>